<template>
    <div class="common-layout">
        <el-container>
            <!-- 设置宽度 -->
            <el-aside :width="$store.state.homeview.navBool">
                <!-- 侧边栏 -->
                <LeftNav></LeftNav>
            </el-aside>
            <el-container>
                <el-header>
                    <TopRight></TopRight>
                </el-header>
                <el-main>
                    <!-- 路由出口设置 -->
                    <router-view></router-view>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>
<script setup>
//侧边栏
import LeftNav from "../components/LeftNav"
//顶部栏
import TopRight from "../components/TopRight"
import { onMounted } from "vue";
import router from '../router/index';
onMounted(() => {
    // console.log($store.state.homeview.navBool, "宽度")
})
</script>
<style lang="scss">
.common-layout {
    .el-aside {
        background-color: pink;
    }

    .el-header {
        background-color: gold;
    }

    .el-main {
        background-color: burlywood;
    }

    // 高度100%
    .el-aside,
    .el-container,
    .common-layout,
    #app,
    body,
    html {
        height: 100%;
    }
}
</style>